import http from '../utils/http'

const apiName = '/vpi/operate'

const startChargingApi = {
  // 启动充电
  startCharging(charingPilesSn, socketSn) {
    return http.post(`${apiName}/start`, { charingPilesSn, socketSn }, { timeout: 60000 }) // 60秒超时
  },

  // 查询充电枪状态
  getChargingProgress(charingPilesSn) {
    return http.post(`${apiName}/state`, charingPilesSn)
  }
}

export default startChargingApi